package io.renren.modules.commodity.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.behavior.entity.UserBehaviorLogEntity;
import io.renren.modules.commodity.entity.CommodityEntity;
import io.renren.modules.commodity.vo.CommodityVo;

import java.util.List;
import java.util.Map;

/**
 * 商品表
 *
 * @author xianwenchao
 * @email 1140617792@qq.com
 * @date 2021-01-28 10:07:37
 */
public interface CommodityService extends IService<CommodityEntity> {

    PageUtils queryPage(Map<String, Object> params);

    CommodityEntity queryById(Long id);

    /**
     * 用户点赞或取消点赞
     */
    void userLikeOrDislike(Long itemId);

    /**
     * 用户收藏或取消商品
     * @param itemId    商品id
     */
    void userCollectionOrNot(Long itemId);

    /**
     * 用户评论商品
     * @param userBehaviorLogEntity 用户行为类
     */
    void userCommentItem(UserBehaviorLogEntity userBehaviorLogEntity);

    List<UserBehaviorLogEntity> allItemComment(Long itemId);

    List<CommodityEntity> guessUserLike();

}

